{% extends "repo_master.html" %}

{% block title %}Forks - {{ repo.name }}{% endblock %}
{% set tag = "home" %}


{% block repo %}

<h2>Forks <span class="label label-default">{{repo.forks | count}}</span></h2>

<section class="forks_list">
  {% if repo.forks %}
  <div class="list-group">
    {% for fork in repo.forks %}
      <div class="list-group-item">
        <h5>
          <strong><a href="{{ url_for('view_repo', username=fork.user.user,repo=fork.name) }}">
              <span class="oi text-muted" data-glyph="fork"></span>
              {{ fork.user.user }}/{{ fork.name }}
          </a></strong>
          <div class="pull-xs-right">
            <span>
              <a href="{{ url_for('view_user', username=fork.user.user)}}">{{ fork.user.default_email | avatar(20) | safe }}
                  {{ fork.user.fullname }}</a> forked this project
            </span>
            <span class="commitdate" data-toggle="tooltip" title="{{
                fork.date_created.strftime('%Y-%m-%d %H:%M:%S') }}">
                <strong>{{ fork.date_created|humanize }}</strong>
            </span>
          </div>
        </h5>
      </div>

    {% endfor %}
  </div>
  {% else %}
  <p>
    This project has not been forked.
  </p>
  {% endif %}
</section>

{% endblock %}
